package tekdays

class TekEvent {
	
	String city
	String name
	TekUser organizer
	String venue
	Date startDate
	Date endDate
	String description
	String twitterId
	String twitterPassword
	
	static hasMany = [volunteers : TekUser, 
	respondents : String, 
	sponsorships : Sponsorship,
	tasks : Task,
	messages : Message]	
	
	String toString() {
		"$name, $city"
	}
	
	static searchable = true
	
	static constraints = {
		name(blank:false)
		city(blank:false)
		description(maxSize : 5000)
		organizer(nullable:false)
		venue(nullable:true)
		startDate(nullable:true)
		endDate(nullable:true)
		volunteers(nullable : true)
		sponsorships(nullable : true)
		tasks(nullable : true)
		messages(nullable : true)
		twitterId(nullable:true)
		twitterPassword(nullable:true)
	}
}
